home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / dom / nsIDOMWindow.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  13KB  |  355 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDOMWindow.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDOMWindow_h__
  6. #define __gen_nsIDOMWindow_h__
  7.  
  8.  
  9. #ifndef __gen_domstubs_h__
  10. #include "domstubs.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISelection; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIDOMWindow */
  21. #define NS_IDOMWINDOW_IID_STR "a6cf906b-15b3-11d2-932e-00805f8add32"
  22.  
  23. #define NS_IDOMWINDOW_IID \
  24.   {0xa6cf906b, 0x15b3, 0x11d2, \
  25.     { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  26.  
  27. class NS_NO_VTABLE nsIDOMWindow : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOW_IID)
  31.  
  32.   /**
  33.  * The nsIDOMWindow interface is the primary interface for a DOM
  34.  * window object. It represents a single window object that may
  35.  * contain child windows if the document in the window contains a
  36.  * HTML frameset document or if the document contains iframe elements.
  37.  *
  38.  * This interface is not officially defined by any standard bodies, it
  39.  * originates from the defacto DOM Level 0 standard.
  40.  *
  41.  * @status FROZEN
  42.  */
  43. /**
  44.    * Accessor for the document in this window.
  45.    */
  46.   /* readonly attribute nsIDOMDocument document; */
  47.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
  48.  
  49.   /**
  50.    * Accessor for this window's parent window, or the window itself if
  51.    * there is no parent, or if the parent is of different type
  52.    * (i.e. this does not cross chrome-content boundaries).
  53.    */
  54.   /* readonly attribute nsIDOMWindow parent; */
  55.   NS_IMETHOD GetParent(nsIDOMWindow * *aParent) = 0;
  56.  
  57.   /**
  58.    * Accessor for the root of this hierarchy of windows. This root may
  59.    * be the window itself if there is no parent, or if the parent is
  60.    * of different type (i.e. this does not cross chrome-content
  61.    * boundaries).
  62.    *
  63.    * This property is "replaceable" in JavaScript */
  64.   /* readonly attribute nsIDOMWindow top; */
  65.   NS_IMETHOD GetTop(nsIDOMWindow * *aTop) = 0;
  66.  
  67.   /**
  68.    * Accessor for the object that controls whether or not scrollbars
  69.    * are shown in this window.
  70.    *
  71.    * This attribute is "replaceable" in JavaScript
  72.    */
  73.   /* readonly attribute nsIDOMBarProp scrollbars; */
  74.   NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) = 0;
  75.  
  76.   /**
  77.    * Accessor for the child windows in this window.
  78.    */
  79.   /* [noscript] readonly attribute nsIDOMWindowCollection frames; */
  80.   NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) = 0;
  81.  
  82.   /**
  83.    * Set/Get the name of this window.
  84.    *
  85.    * This attribute is "replaceable" in JavaScript
  86.    */
  87.   /* attribute DOMString name; */
  88.   NS_IMETHOD GetName(nsAString & aName) = 0;
  89.   NS_IMETHOD SetName(const nsAString & aName) = 0;
  90.  
  91.   /**
  92.    * Set/Get the document scale factor as a multiplier on the default
  93.    * size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED
  94.    * error may be returned by implementations not supporting
  95.    * zoom. Implementations not supporting zoom should return 1.0 all
  96.    * the time for the Get operation. 1.0 is equals normal size,
  97.    * i.e. no zoom.
  98.    */
  99.   /* [noscript] attribute float textZoom; */
  100.   NS_IMETHOD GetTextZoom(float *aTextZoom) = 0;
  101.   NS_IMETHOD SetTextZoom(float aTextZoom) = 0;
  102.  
  103.   /**
  104.    * Accessor for the current x scroll position in this window in
  105.    * pixels.
  106.    *
  107.    * This attribute is "replaceable" in JavaScript
  108.    */
  109.   /* readonly attribute long scrollX; */
  110.   NS_IMETHOD GetScrollX(PRInt32 *aScrollX) = 0;
  111.  
  112.   /**
  113.    * Accessor for the current y scroll position in this window in
  114.    * pixels.
  115.    *
  116.    * This attribute is "replaceable" in JavaScript
  117.    */
  118.   /* readonly attribute long scrollY; */
  119.   NS_IMETHOD GetScrollY(PRInt32 *aScrollY) = 0;
  120.  
  121.   /**
  122.    * Method for scrolling this window to an absolute pixel offset.
  123.    */
  124.   /* void scrollTo (in long xScroll, in long yScroll); */
  125.   NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) = 0;
  126.  
  127.   /**
  128.    * Method for scrolling this window to a pixel offset relative to
  129.    * the current scroll position.
  130.    */
  131.   /* void scrollBy (in long xScrollDif, in long yScrollDif); */
  132.   NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) = 0;
  133.  
  134.   /**
  135.    * Method for accessing this window's selection object.
  136.    */
  137.   /* nsISelection getSelection (); */
  138.   NS_IMETHOD GetSelection(nsISelection **_retval) = 0;
  139.  
  140.   /**
  141.    * Method for scrolling this window by a number of lines.
  142.    */
  143.   /* void scrollByLines (in long numLines); */
  144.   NS_IMETHOD ScrollByLines(PRInt32 numLines) = 0;
  145.  
  146.   /**
  147.    * Method for scrolling this window by a number of pages.
  148.    */
  149.   /* void scrollByPages (in long numPages); */
  150.   NS_IMETHOD ScrollByPages(PRInt32 numPages) = 0;
  151.  
  152.   /**
  153.    * Method for sizing this window to the content in the window.
  154.    */
  155.   /* void sizeToContent (); */
  156.   NS_IMETHOD SizeToContent(void) = 0;
  157.  
  158. };
  159.  
  160. /* Use this macro when declaring classes that implement this interface. */
  161. #define NS_DECL_NSIDOMWINDOW \
  162.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
  163.   NS_IMETHOD GetParent(nsIDOMWindow * *aParent); \
  164.   NS_IMETHOD GetTop(nsIDOMWindow * *aTop); \
  165.   NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars); \
  166.   NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames); \
  167.   NS_IMETHOD GetName(nsAString & aName); \
  168.   NS_IMETHOD SetName(const nsAString & aName); \
  169.   NS_IMETHOD GetTextZoom(float *aTextZoom); \
  170.   NS_IMETHOD SetTextZoom(float aTextZoom); \
  171.   NS_IMETHOD GetScrollX(PRInt32 *aScrollX); \
  172.   NS_IMETHOD GetScrollY(PRInt32 *aScrollY); \
  173.   NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll); \
  174.   NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif); \
  175.   NS_IMETHOD GetSelection(nsISelection **_retval); \
  176.   NS_IMETHOD ScrollByLines(PRInt32 numLines); \
  177.   NS_IMETHOD ScrollByPages(PRInt32 numPages); \
  178.   NS_IMETHOD SizeToContent(void); 
  179.  
  180. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  181. #define NS_FORWARD_NSIDOMWINDOW(_to) \
  182.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
  183.   NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return _to GetParent(aParent); } \
  184.   NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return _to GetTop(aTop); } \
  185.   NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return _to GetScrollbars(aScrollbars); } \
  186.   NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return _to GetFrames(aFrames); } \
  187.   NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
  188.   NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \
  189.   NS_IMETHOD GetTextZoom(float *aTextZoom) { return _to GetTextZoom(aTextZoom); } \
  190.   NS_IMETHOD SetTextZoom(float aTextZoom) { return _to SetTextZoom(aTextZoom); } \
  191.   NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return _to GetScrollX(aScrollX); } \
  192.   NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return _to GetScrollY(aScrollY); } \
  193.   NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return _to ScrollTo(xScroll, yScroll); } \
  194.   NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return _to ScrollBy(xScrollDif, yScrollDif); } \
  195.   NS_IMETHOD GetSelection(nsISelection **_retval) { return _to GetSelection(_retval); } \
  196.   NS_IMETHOD ScrollByLines(PRInt32 numLines) { return _to ScrollByLines(numLines); } \
  197.   NS_IMETHOD ScrollByPages(PRInt32 numPages) { return _to ScrollByPages(numPages); } \
  198.   NS_IMETHOD SizeToContent(void) { return _to SizeToContent(); } 
  199.  
  200. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  201. #define NS_FORWARD_SAFE_NSIDOMWINDOW(_to) \
  202.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  203.   NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParent(aParent); } \
  204.   NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTop(aTop); } \
  205.   NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollbars(aScrollbars); } \
  206.   NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrames(aFrames); } \
  207.   NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  208.   NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \
  209.   NS_IMETHOD GetTextZoom(float *aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextZoom(aTextZoom); } \
  210.   NS_IMETHOD SetTextZoom(float aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTextZoom(aTextZoom); } \
  211.   NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollX(aScrollX); } \
  212.   NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollY(aScrollY); } \
  213.   NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollTo(xScroll, yScroll); } \
  214.   NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollBy(xScrollDif, yScrollDif); } \
  215.   NS_IMETHOD GetSelection(nsISelection **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelection(_retval); } \
  216.   NS_IMETHOD ScrollByLines(PRInt32 numLines) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByLines(numLines); } \
  217.   NS_IMETHOD ScrollByPages(PRInt32 numPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByPages(numPages); } \
  218.   NS_IMETHOD SizeToContent(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeToContent(); } 
  219.  
  220. #if 0
  221. /* Use the code below as a template for the implementation class for this interface. */
  222.  
  223. /* Header file */
  224. class nsDOMWindow : public nsIDOMWindow
  225. {
  226. public:
  227.   NS_DECL_ISUPPORTS
  228.   NS_DECL_NSIDOMWINDOW
  229.  
  230.   nsDOMWindow();
  231.  
  232. private:
  233.   ~nsDOMWindow();
  234.  
  235. protected:
  236.   /* additional members */
  237. };
  238.  
  239. /* Implementation file */
  240. NS_IMPL_ISUPPORTS1(nsDOMWindow, nsIDOMWindow)
  241.  
  242. nsDOMWindow::nsDOMWindow()
  243. {
  244.   /* member initializers and constructor code */
  245. }
  246.  
  247. nsDOMWindow::~nsDOMWindow()
  248. {
  249.   /* destructor code */
  250. }
  251.  
  252. /* readonly attribute nsIDOMDocument document; */
  253. NS_IMETHODIMP nsDOMWindow::GetDocument(nsIDOMDocument * *aDocument)
  254. {
  255.     return NS_ERROR_NOT_IMPLEMENTED;
  256. }
  257.  
  258. /* readonly attribute nsIDOMWindow parent; */
  259. NS_IMETHODIMP nsDOMWindow::GetParent(nsIDOMWindow * *aParent)
  260. {
  261.     return NS_ERROR_NOT_IMPLEMENTED;
  262. }
  263.  
  264. /* readonly attribute nsIDOMWindow top; */
  265. NS_IMETHODIMP nsDOMWindow::GetTop(nsIDOMWindow * *aTop)
  266. {
  267.     return NS_ERROR_NOT_IMPLEMENTED;
  268. }
  269.  
  270. /* readonly attribute nsIDOMBarProp scrollbars; */
  271. NS_IMETHODIMP nsDOMWindow::GetScrollbars(nsIDOMBarProp * *aScrollbars)
  272. {
  273.     return NS_ERROR_NOT_IMPLEMENTED;
  274. }
  275.  
  276. /* [noscript] readonly attribute nsIDOMWindowCollection frames; */
  277. NS_IMETHODIMP nsDOMWindow::GetFrames(nsIDOMWindowCollection * *aFrames)
  278. {
  279.     return NS_ERROR_NOT_IMPLEMENTED;
  280. }
  281.  
  282. /* attribute DOMString name; */
  283. NS_IMETHODIMP nsDOMWindow::GetName(nsAString & aName)
  284. {
  285.     return NS_ERROR_NOT_IMPLEMENTED;
  286. }
  287. NS_IMETHODIMP nsDOMWindow::SetName(const nsAString & aName)
  288. {
  289.     return NS_ERROR_NOT_IMPLEMENTED;
  290. }
  291.  
  292. /* [noscript] attribute float textZoom; */
  293. NS_IMETHODIMP nsDOMWindow::GetTextZoom(float *aTextZoom)
  294. {
  295.     return NS_ERROR_NOT_IMPLEMENTED;
  296. }
  297. NS_IMETHODIMP nsDOMWindow::SetTextZoom(float aTextZoom)
  298. {
  299.     return NS_ERROR_NOT_IMPLEMENTED;
  300. }
  301.  
  302. /* readonly attribute long scrollX; */
  303. NS_IMETHODIMP nsDOMWindow::GetScrollX(PRInt32 *aScrollX)
  304. {
  305.     return NS_ERROR_NOT_IMPLEMENTED;
  306. }
  307.  
  308. /* readonly attribute long scrollY; */
  309. NS_IMETHODIMP nsDOMWindow::GetScrollY(PRInt32 *aScrollY)
  310. {
  311.     return NS_ERROR_NOT_IMPLEMENTED;
  312. }
  313.  
  314. /* void scrollTo (in long xScroll, in long yScroll); */
  315. NS_IMETHODIMP nsDOMWindow::ScrollTo(PRInt32 xScroll, PRInt32 yScroll)
  316. {
  317.     return NS_ERROR_NOT_IMPLEMENTED;
  318. }
  319.  
  320. /* void scrollBy (in long xScrollDif, in long yScrollDif); */
  321. NS_IMETHODIMP nsDOMWindow::ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif)
  322. {
  323.     return NS_ERROR_NOT_IMPLEMENTED;
  324. }
  325.  
  326. /* nsISelection getSelection (); */
  327. NS_IMETHODIMP nsDOMWindow::GetSelection(nsISelection **_retval)
  328. {
  329.     return NS_ERROR_NOT_IMPLEMENTED;
  330. }
  331.  
  332. /* void scrollByLines (in long numLines); */
  333. NS_IMETHODIMP nsDOMWindow::ScrollByLines(PRInt32 numLines)
  334. {
  335.     return NS_ERROR_NOT_IMPLEMENTED;
  336. }
  337.  
  338. /* void scrollByPages (in long numPages); */
  339. NS_IMETHODIMP nsDOMWindow::ScrollByPages(PRInt32 numPages)
  340. {
  341.     return NS_ERROR_NOT_IMPLEMENTED;
  342. }
  343.  
  344. /* void sizeToContent (); */
  345. NS_IMETHODIMP nsDOMWindow::SizeToContent()
  346. {
  347.     return NS_ERROR_NOT_IMPLEMENTED;
  348. }
  349.  
  350. /* End of implementation class template. */
  351. #endif
  352.  
  353.  
  354. #endif /* __gen_nsIDOMWindow_h__ */
  355.